package com.gouaixin.bee.beeframework2.model;

import android.content.Context;

import com.gouaixin.bee.beeframework2.tool.mLog;

/**
 * 作者：Fisher on 2015/5/7 09:28
 * 邮箱：630709658@qq.com
 * 座右铭:知识来自积累,经验源于总结
 */
//身高和距离
public class HeightModel {
    public static int HeightMin = 158;//最小身高
    public static int HeightMax = 170;//最大身高

    public static int JuliMin = 2;//最小距离
    public static int JuliMax = 30;//最大距离


    /**
     * 根据jid随机生成身高
     *
     * @param context
     * @param jid
     * @return
     */
    public static String getHeight(Context context, String jid) {
        if (jid != null) {
            int length = HeightMax - HeightMin + 1;
            int jidValue = Integer.parseInt(jid);
            int temp = jidValue % length;
            int jidHeight = HeightMin + temp;
            mLog.e("根据jid随机生成身高：jid=" + jid + "\tjidHeight=" + jidHeight);
            return jidHeight + "CM";
        } else {
            return "170CM";
        }


    }


    /**
     * 根据jid随机生成距离
     *
     * @param context
     * @param jid
     * @return
     */
    public static String getJuli(Context context, String jid) {
        if (jid != null) {
            int length = JuliMax - JuliMin + 1;
            int jidValue = Integer.parseInt(jid);
            int temp = jidValue % length;
            int jidJuli = JuliMin + temp;
            mLog.e("根据jid随机生成距离：jid=" + jid + "\tjidJuli=" + jidJuli);
            return jidJuli + "KM";
        } else {
            return "15KM";
        }


    }
}
